package com.hcss.core.common.filemgt.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hcss.core.common.filemgt.service.AnnexFileService;
import com.hcss.core.mvc.BaseController;



/**  
 *
 * @ClassName: AnnexController
 * @author: lvfang 
 * @date: 2014年2月24日 下午1:08:09
 * @version: V1.0  
 */
@Controller
@RequestMapping("/annex")
public class AnnexFileController extends BaseController{
	@Autowired
	private AnnexFileService annexFileService;
	
	/**
	 * @Title: deleteFile
	 * <p>删除附件信息<p>
	 * @throws Exception
	 * @return: Map<String,String>
	 */
	@RequestMapping("/deleteFile")
	@ResponseBody
	public Map<String,String> deleteFile(HttpServletRequest request,
			@RequestParam("fileId") int fileId) throws Exception{
		
		return this.getMsgTip(annexFileService.deleteUploadFile(request, fileId)?1:0);
	}
}
